package entity;

public class CourseSelectionSystem {
    public static void main(String[] args) {
        // 创建教师
        Teacher teacher1 = new Teacher("T001", "张教授", "男", null);
        Teacher teacher2 = new Teacher("T002", "李教授", "女", null);

        // 创建课程
        Course course1 = new Course("C001", "Java编程", "教学楼A101", "周一 9:00-11:00", teacher1);
        Course course2 = new Course("C002", "数据库原理", "教学楼B205", "周三 14:00-16:00", teacher2);

        // 教师开课
        teacher1.offerCourse(course1);
        teacher2.offerCourse(course2);

        // 创建学生
        Student student1 = new Student("S001", "张三", "男");
        Student student2 = new Student("S002", "李四", "女");

        // 显示人员信息
        System.out.println("\n=== 人员信息 ===");
        teacher1.displayInfo();
        teacher2.displayInfo();
        student1.displayInfo();
        student2.displayInfo();

        // 学生选课
        System.out.println("\n=== 选课过程 ===");
        student1.selectCourse(course1);
        student2.selectCourse(course2);

        // 打印课表
        System.out.println("\n=== 学生课表 ===");
        student1.printCourseSchedule();
        student2.printCourseSchedule();

        // 学生退课
        System.out.println("\n=== 退课过程 ===");
        student1.dropCourse();
        student1.printCourseSchedule();

        // 再次选课
        System.out.println("\n=== 重新选课 ===");
        student1.selectCourse(course2);
        student1.printCourseSchedule();
    }
}